repo: Add prefixes to errors for querying size/deleting
authorColin Walters <walters@verbum.org>
Thu, 25 Aug 2016 17:16:46 +0000 (13:16 -0400)
committerAtomic Bot <atomic-devel@projectatomic.io>
Thu, 25 Aug 2016 20:01:37 +0000 (20:01 +0000)
I hit these while causing errors in prune.  Let's add the specific
object we were looking for.

Closes: #471
Approved by: jlebon

src/libostree/ostree-repo.c

index a41f29c93418fb8b6dbfda72c8ac8c71c8fbd858..5e9818fdaf8c026d597e2a51349c610037cd6ec6 100644 (file)
@@ -3136,7 +3136,7 @@ ostree_repo_delete_object (OstreeRepo           *self,
   while (G_UNLIKELY (res == -1 && errno == EINTR));
   if (G_UNLIKELY (res == -1))
     {
-      glnx_set_error_from_errno (error);
+      glnx_set_prefix_error_from_errno (error, "Deleting object %s.%s", sha256, ostree_object_type_to_string (objtype));
       goto out;
     }
 
@@ -3444,7 +3444,7 @@ ostree_repo_query_object_storage_size (OstreeRepo           *self,
   while (G_UNLIKELY (res == -1 && errno == EINTR));
   if (G_UNLIKELY (res == -1))
     {
-      glnx_set_error_from_errno (error);
+      glnx_set_prefix_error_from_errno (error, "Querying object %s.%s", sha256, ostree_object_type_to_string (objtype));
       goto out;
     }